﻿using System;
using System.Linq;
using ilgolosone.Shared.Domain;

namespace ilgolosone.Shared.Data
{
    /// <summary>
    /// Contratto che definisce il repository.
    /// </summary>
    public interface IRepository<TEntity> : IQueryable<TEntity>, IDisposable where TEntity : IAggregateRoot
    {
        TEntity Get(Guid id);
        void Save(TEntity entity);
        void Delete(TEntity entity);
        void DeleteAll();
    }
}